﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Banner.Master" CodeBehind="login.aspx.vb" Inherits="ETeacherforIELTS.login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" >
    <table class="bgStyle" border="2">
        <tr>
            <td class="sides">
                &nbsp;</td>
            <td class="listView">
                <table cellpadding="7" class="innerTable" style="border: thin dashed #C0C0C0">
                    <tr>
                        <td class="HeadingStyle" valign="bottom">
                            Featured articles</td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <asp:Panel ID="Panel1" runat="server" BackColor="White" BorderColor="White">
                                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" BorderColor="#999999" BorderStyle="Solid" 
                                    CssClass="innerTable" DataKeyNames="ID" DataSourceID="SqlIELTSdata" 
                                    PageSize="5">
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <table class="databoundStyle">
                                                    <tr>
                                                        <td>
                                                            &nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Image ID="img_Picture" runat="server" Height="89px" 
                                                                ImageUrl='<%#Eval("Picture") %>' Width="108px" />
                                                        </td>
                                                        <td rowspan="3">
                                                            <table class="databoundStyle">
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="Label1" runat="server" CssClass="TitleStyle" Text="Title : "></asp:Label>
                                                                        <asp:Label ID="lbl_MaterialName" runat="server" CssClass="databoundStyle" 
                                                                            ForeColor="Gray" text='<%# Eval("MaterialName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="Label2" runat="server" CssClass="TitleStyle" Text="Category : "></asp:Label>
                                                                        <asp:Label ID="lbl_Category" runat="server" CssClass="databoundStyle" 
                                                                            ForeColor="Gray" Text='<%# Eval("Category") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="Label3" runat="server" CssClass="TitleStyle" Text="Stars : "></asp:Label>
                                                                        <asp:Label ID="Label4" runat="server" CssClass="databoundStyle" 
                                                                            ForeColor="Gray" text='<%# Eval("Stars") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="Label5" runat="server" CssClass="TitleStyle" 
                                                                            Text="Visited Count : "></asp:Label>
                                                                        <asp:Label ID="Label6" runat="server" CssClass="databoundStyle" 
                                                                            ForeColor="Gray" text='<%# Eval("VisitedCount") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            by&nbsp;&nbsp;
                                                            <asp:Label ID="Label7" runat="server" Text='<%# Eval("UserName", "{0}") %>'></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <br />
                                            </ItemTemplate>
                                            <ItemStyle BackColor="AliceBlue" />
                                            <HeaderStyle BackColor="White" BorderColor="White" BorderWidth="1px" />
                                        </asp:TemplateField>
                                       
                                    </Columns>
                                    <EmptyDataTemplate>
                                        <table class="databoundStyle">
                                            <tr>
                                                <td>
                                                    <asp:Image ID="img_Picture0" runat="server" Height="117px" Width="112px" />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lbl_MaterialName0" runat="server"></asp:Label>
                                                    <asp:Label ID="lbl_Category0" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;</td>
                                                <td>
                                                    &nbsp;</td>
                                            </tr>
                                        </table>
                                    </EmptyDataTemplate>
                                </asp:GridView>
                                <asp:SqlDataSource ID="SqlIELTSdata" runat="server" 
                                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                                    SelectCommand="SELECT [ID], [MaterialName], [Description], [Category], [File], [Picture], [Stars], [VisitedCount], [UserName] FROM [MaterialCollection]">
                                </asp:SqlDataSource>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
            </td>
            <td valign="top">
                <asp:Login ID="Login1" runat="server" 
    CreateUserText="Not Register Yet? Click Here" CreateUserUrl="~/register.aspx" 
        style="text-align: center" DestinationPageUrl="~/list.aspx">
</asp:Login>
            </td>
            <td class ="sides">
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <asp:LoginName ID="LoginName1" runat="server" style="text-align: center" />
</asp:Content>
